package ft.app.gtig.entity;

import com.haulmont.chile.core.datatypes.impl.EnumClass;

import javax.annotation.Nullable;


public enum ColorEnum implements EnumClass<String> {
    DodgerBlue("#3d93e6"),
    DeepSkyBlue("#1ab4f4"),
    DarkTurquoise("#44d3d9"),
    GreenYellow("#c5ec75"),
    Yellow("#e1f556");

    private String id;

    ColorEnum(String value) {
        this.id = value;
    }

    public String getId() {
        return id;
    }

    @Nullable
    public static ColorEnum fromId(String id) {
        for (ColorEnum at : ColorEnum.values()) {
            if (at.getId().equals(id)) {
                return at;
            }
        }
        return null;
    }
}